package cn.wmw.xyy.feign;

import cn.wmw.result.JsonResult;
import cn.wmw.xyy.doc.CourseDoc;
import cn.wmw.xyy.fallback.EsCourseFeignClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(value = "service-elasticsearch",path = "es-course",contextId = "esCourseFeignClient",fallbackFactory = EsCourseFeignClientFallbackFactory.class)
public interface EsCourseFeignClient {
    @RequestMapping(value="/save",method= RequestMethod.POST)
    JsonResult saveOrUpdate(@RequestBody CourseDoc courseDoc);
}
